home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Apple Development Tools / MacsBug 6.5.4a6.sit / MacsBug 6.5.4a6 / MacsBug 6.5.4a6 Read Me < prev    next >
Text File  |  1998-09-22  |  16KB  |  382 lines

  1.  About MacsBug 6.5.4a6
  2.    9/14/98
  3.  
  4.     INSTALLATION INSTRUCTIONS
  5.  
  6.     • MacsBug includes a number of folders. The contents of each is as follows:
  7.  
  8.         “into System Folder” - This contains MacsBug itself. To install, place the “MacsBug” file
  9.         into your System folder and restart your machine.
  10.  
  11.         “into MacsBug Preferences folder” - This contains optional debugger commands (“dcmds”).
  12.         There are currently
  13.         two dcmds in this folder; Leaks and PageFaults. Leaks is no longer included within MacsBug
  14.         because it patches a number of Memory Manager traps with 68K code, potentially slowing
  15.         down the system. PageFaults isn’t installed because it patches the virtual memory system,
  16.         also potentially slowing down some operations. To install either dcmd, copy the appropriate
  17.         file into your “MacsBug Preferences” folder, which is located in your “Preferences” folder.
  18.  
  19.         “into Debugger Prefs file” - This contains the standard U.S. 'KCHR' keyboard translation
  20.         resource. It is needed when using MacsBug to debug on a system that is using a non-U.S.
  21.         keyboard layout (MacsBug requires U.S. keyboard translation). To install, copy the
  22.         'KCHR' resource from this file into your “Debugger Prefs” file using ResEdit, or rename
  23.         the file to “Debugger Prefs”. The file must be located in the System folder.
  24.  
  25.         “Building dcmds” - This contains sample C and Pascal source for a variety of dcmds, as
  26.         well as all headers and libraries necessary to build dcmds within the MPW and Metrowerks
  27.         CodeWarrior environments.
  28.  
  29.     • The set of dcmds that was previously distributed in the optional file “PowerPC dmcds” has
  30.     been merged into MacsBug itself. When installing MacsBug, you should make sure to
  31.     remove this file from your “MacsBug Preferences” folder.
  32.  
  33.     • When MacsBug is first entered, it displays a message if it has encountered dcmds that have
  34.     the same name. If you see this message, you should examine all of your preference files and
  35.     remove any duplicates. MacsBug does not guarantee which dcmd is used when a name
  36.     collision occurs, so you may be accidentally using an old dcmd.
  37.  
  38.  
  39.     A-TRAPS
  40.  
  41.     • You can now step into the KeyTranslate trap if you so desire. You used to step into
  42.     MacsBug’s patch (which is only installed when MacsBug is active), but you wouldn’t know
  43.     that because it would lock up the machine before you got there.
  44.  
  45.  
  46.     BREAKPOINTS
  47.  
  48.     • When setting a breakpoint in a file-mapped file, we no longer leave the 4K page
  49.     containing the breakpoint writeable.
  50.  
  51.  
  52.     DISASSEMBLY
  53.     
  54.     • When disassembling a 68K JSR (An) or JMP (An) at the current PC, and the address
  55.     register used by the instruction has a bad value, we no longer explode trying to show the PC
  56.     window. We now display something like this if we can’t read from the destination address:
  57.  
  58.             +0000 015D5B0  *JSR  (A0)=<Bad Destination Address>         | 4E90
  59.  
  60.     • When disassembling a cross-TOC PowerPC call, and the library we’re calling into has as its
  61.     first exported symbol a re-export from another library, we no longer use the wrong value for
  62.     the TOC register. This prevents the embedded symbol searching code from crashing.
  63.               
  64.     • When scanning through exported symbols from a CFM container, we now skip past re-
  65.     exported unresolved weak imports (whew!). This fixes a problem where we’d not show any
  66.     of the exported symbols from a certain glue library.
  67.  
  68.     • When symbols are off, we still do macro replacement so names will show up in PowerPC
  69.     low memory accessors.
  70.  
  71.  
  72.     FILLING MEMORY
  73.     
  74.     • Enhanced FILL to support byte, words, longs, and strings, and removed the restriction that
  75.               the number of bytes be a multiple of four.
  76.  
  77.  
  78.     FONTOLOGY
  79.     
  80.     • Most control characters are no longer drawn. The font was expanded in 6.5.4a5, but this
  81.     made for a cluttered display, which made browsing for ASCII in memory dumps more
  82.     difficult.
  83.  
  84.  
  85.     HEAP COMMANDS
  86.  
  87.     • Amazingly, “HC ALL” (Heap Check) didn’t. Under Modern Memory Manager systems it
  88.     failed to check most application heaps.
  89.  
  90.     • When running under the Modern Memory Manager, we now check the free block list for
  91.     consistency.
  92.  
  93.     • Fixed a bug where the master pointer free list wasn’t being checked if running under the
  94.     Modern Memory Manager.
  95.  
  96.     • “HX” (Heap Exchange) now supports two additional methods to select a target application
  97.     heap. You can now specify the heap by creator as in “HX 'MACS'”, or by using the application
  98.     name as in “HX "Finder"”.
  99.  
  100.  
  101.     MOUSE CONTROL
  102.  
  103.     • When the history area sees a click on a word, it now cleans it up a bit before inserting it into
  104.     the command line. Specifically, we remove “0x” or '$' from the beginning of a 2-, 4-, or 8-digit
  105.     hex number, and remove trailing commas (',').
  106.               
  107.     • When resizing the PC window, the minimum height of the PC area is now two lines.
  108.             
  109.     • You can now disable MacsBug’s use of the mouse two ways. You can permanently disable it
  110.     by setting the “Don’t use mouse in MacsBug” bit in the 'mxpr' (MacsBug Preferences) resource
  111.     in your “Debugger Prefs” file. You can also use the new “MOUSE” option to the “SET”
  112.     command to turn it off at runtime. Turing the mouse off can be useful when debugging code
  113.     that tracks an action while the mouse button is down.
  114.               
  115.     • MacsBug no longer generates spurious mouse downs when MacsBug is entered and the
  116.     mouse was already down. Usually you’d notice that the history area had been clicked if you
  117.     had the mouse button down and moved the mouse.
  118.  
  119.  
  120.     MISCELLANEOUS
  121.  
  122.     • Added “FKEY” (Function Key) command. For example, “FKEY 3” takes a screenshot,
  123.     provided the File Manager is not busy and you have a valid A5 world.
  124.  
  125.     • “SET SIMPLIFIED” now refreshes the PC window.
  126.  
  127.     • If MacsBug is entered in 68K code as a result of an exception that went unhandled in
  128.     PowerPC code, we now say something useful about the event. We used to say “Spurious
  129.     Interrupt or Uninitialized Interrupt Vector” which had absolutely nothing to do with what
  130.     really happened. This should occur very rarely (such as when MacsBug starts speaking
  131.     Esperanto and throwing furniture about).
  132.  
  133.     • “log?” or “log ?” now shows the status of logging.
  134.  
  135.     • Completely rewrote MacsBug’s keyboard input path to share identical code between
  136.     MacsBug and MacsBugApp. Rewrote MacsBug’s display primitives to be more flexible for
  137.     future mouse-based control. Neither of these is directly user-visible, but much code has
  138.     changed, and we could have broken something.
  139.  
  140.  
  141.     NMIs
  142.     
  143.     • When handling an NMI in PowerPC code, we no longer allow one to trigger while
  144.     MacsBug’s nub code is active. This prevents some rare but annoying crashes with the new
  145.     Watch Points implementation.
  146.  
  147.  
  148.     POWERPC REGISTERS
  149.  
  150.     • Added a new command, “TV” (Total PowerPC Vector display), which shows the PowerPC
  151.     AltiVec™ vector registers if they are present.
  152.  
  153.     • Added registers v0 through v31 to support the PowerPC vector unit. These are mostly
  154.     useless right now since they are 128-bit registers, and MacsBug can only deal with 32-bit
  155.     values.
  156.  
  157.     • Added the 601 MQ register to the PowerPC registers shown by “TD”. We knew you’d been
  158.     craving it.
  159.  
  160.     • Disassembly now knows names for all of the supervisor registers present in the 603, 604,
  161.     604e, and 740/750 processors.
  162.  
  163.  
  164.     REBOOTING
  165.  
  166.     • The “RS” (Restart) and “RB” (Reboot) commands now work again on PowerPC machines
  167.     older than the Power Macintosh 9500. This was broken when we removed support for the
  168.     Mac Plus in 6.5.4a3.
  169.  
  170.  
  171.     SYMBOL LOOKUP
  172.  
  173.     • Finally fixed and re-enabled our symbol lookup cache. Some symbol lookups should be
  174.     slightly faster, but you probably won’t notice it.
  175.  
  176.     • Fixed PowerPC symbol lookup to find traceback symbols correctly if we’re looking for a
  177.     symbol that is not all uppercase. This was broken in 6.5.4a5.
  178.  
  179.     • Added a predefined symbol called “TaskLevel” that is an indication of roughly what
  180.     execution context you’re currently executing in. If TaskLevel evaluates to zero, then the
  181.     68K interrupt level is zero and we’re not running VBLs, Deferred Tasks, or Secondary
  182.     Interrupt Handlers. That’ll let you catch most things that run at interrupt time - even if the
  183.     interrupt level is zero.
  184.  
  185.               Also defined is a macro to TaskLevel:  TL
  186.                 
  187.               You can use TaskLevel like this:
  188.             
  189.                           ATB HLock TaskLevel!=0
  190.             
  191.               That sets an A-Trap break on HLock if it’s made at interrupt time.
  192.             
  193.               The value that TaskLevel returns can also be masked:
  194.  
  195.                     Mask with 0x00000007 to get just the 68K interrupt level.
  196.                     Mask with 0x00000010 to get just the “in VBL” bit.
  197.                     Mask with 0x00000020 to get just the “in Deferred Task” bit.
  198.                     Mask with 0x00000040 to get just the “in Secondary Interrupt Handler” bit.              
  199.  
  200.    • When virtual memory is on, MacsBug can now find symbols in file-mapped application
  201.     fragments when the associated heap is targeted with “HX” (Heap Exchange).
  202.  
  203.     • When displaying information on an address that is within a CFM fragment, we now show
  204.     the base and offset into the fragment, as well as the base and offset of a section (if any).
  205.  
  206.     • Looking up a CFM symbol by name is now case-sensitive. We fall back to the old case-
  207.     insensitive search if we don’t find exactly what you typed.
  208.  
  209.     • When searching for a CFM symbol, we now search the CFM context associated with the
  210.     current user zone first. This makes PowerPC name lookup track the “HX”ed heap just like
  211.     68K code always has.
  212.  
  213.     • Optimized the search for embedded 68K symbols in a block that has few or no symbols. For
  214.      a 64K block with no symbols and no LINK A6 (the worst case), we used to call one function
  215.     32,768 times. Now we’ll do it once, but you still probably won’t notice it.
  216.  
  217.     • When adding a ROM map symbol to our internal list, we now make sure the symbol is
  218.     actually in ROM before using it. This fixes problems with some malformed ROMInfo files.
  219.  
  220.     • Fixed a potential heap-corruption bug when processing the ROMInfo file at startup. If there
  221.     were more symbols in the file than our original guess, a failure in resizing a temporary buffer
  222.     was ignored.
  223.  
  224.     • Added recognition of Microsoft Office 98-style cross-TOC glue.
  225.  
  226.  
  227.     TEMPLATE BASIC TYPES
  228.  
  229.     • The RGNHANDLE type now allows wide-open regions to have top and left of -32,768
  230.     rather than -32,767.
  231.  
  232.     • Regions now show the height and width of the bounding box, as well as annotating the
  233.     order of the points.
  234.  
  235.     • Empty regions are now shown as “[empty(0)]” if the bounding rectangle is (0,0,0,0) or just
  236.     “[empty]” if the bounding rectangle is simply empty.
  237.  
  238.     • The heights and widths of regions and rectangles no longer show up as negative when they
  239.     are merely greater than 32,767.
  240.  
  241.     • Added a number of basic type aliases: UInt8, SInt8, UInt16, SInt16, UInt32, and SInt32.
  242.  
  243.  
  244.     TRANSITION VECTOR COMMANDS
  245.  
  246.     • Added initial support for “TVBA” (TVector Break in Application context) and “TVTA”
  247.     (TVector Trace in Application context). These commands don’t work with CFM-68K, and
  248.     might never.
  249.  
  250.     • “TVC” (TVector Clear) now allows an address of a TVector. It now treats the symbol name
  251.      as case-insensitive.
  252.               
  253.     • When “TVD” (TVector Display) is showing the table, the output is now abortable. This is
  254.     particularly useful when you’ve set breaks on all symbols in a library, and thus have a very
  255.     large list.
  256.  
  257.     • When you create a TVector action, we now display the symbol exactly as we got it from
  258.     CFM,  instead of how you typed it.
  259.               
  260.     • When adding multiple TVector actions (TVB, TVT, etc.) to our internal table, if it fills up
  261.               we now stop trying to add more actions on the first failure instead of showing an error for
  262.               each action we couldn’t add.
  263.             
  264.  
  265.    VIRTUAL MEMORY SUPPORT
  266.  
  267.     • Fixed two instances of improperly calling the function PageFaultFatal deep in the bowels
  268.               of MacsBug’s memory accessor code. This makes stack crawls and template displays (among 
  269.               likely other things) work correctly at page-fault-fatal time instead of failing with “unable to
  270.               access that address”. I’m a wingnut, ok?
  271.  
  272.     • MacsBug now understands that it can be loaded before VM is enabled, and will update it’s
  273.               idea of the world if VM state changes. This is really only useful for debugging the Mac OS.
  274.  
  275.  
  276.      WATCH POINTS
  277.  
  278.     • Completely rewritten. Watch Points is now a PowerPC-only feature. See the “About Watch
  279.               Points 6.5.4a6” document for complete information.
  280.  
  281.  
  282.     DCMDS AND DCMD SUPPORT
  283.     
  284.     • Added a sample Metrowerks CodeWarrior Pro 3 dcmd project.
  285.  
  286.     • Fixed a bug that caused MacsBug to crash at startup if a dcmd was an odd number of bytes
  287.     in length.
  288.     
  289.     • Fixed a bug in the expression evaluator that could cause dcmds to loop forever waiting for
  290.     input if a syntax error was detected during a call to dcmdGetNextParameter or
  291.     dcmdGetNextExpression.
  292.  
  293.     • Cache - 3.0b2
  294.  
  295.     Fixed a bug that caused a crash when a stale VCB pointer was left in a cache header.
  296.     Removed an extra line from a copy-and-paste error in the display of the cache age.
  297.  
  298.     • DRD - 3.0d2
  299.  
  300.     All hexadecimal strings are now prefixed with '$' instead of “0x”.
  301.  
  302.     • Drvr - 3.0.2
  303.  
  304.     Changed the storage field to display the “storage” for 68K drivers and the driver version
  305.     for native drivers (in hex).
  306.  
  307.     • EBBE - 2.0b5
  308.  
  309.     Rewrote to use a Time Manager task instead of a VBL task so you can crank down the
  310.     frequency at which it checks for writes. See the new “-r” (rate) option.
  311.                   
  312.     We now support the dcmdShutdown message, which allows EBBE to remove its Time
  313.     Manager task, as well as its Sleep Queue procedure at shutdown time. This is primarily
  314.     so we don’t bring down the system when MacsBugApp quits.
  315.  
  316.     • File - 3.1d2
  317.  
  318.     Changed how we determine if a file belongs to a process to not call the File Manager since
  319.     it could be busy.
  320.  
  321.     • Frags - 1.0b2
  322.  
  323.     We now show the unique closureID when a library is the root of closure.
  324.  
  325.     • FSInfo - 3.0
  326.  
  327.     Added support for Foreign File Access file systems.
  328.  
  329.     • PageFaults - 1.0b6
  330.  
  331.     Newly public. Fixed parameter parsing so that more than one option can be passed on
  332.     the command line at a time. Added “-o” (Order) option so that chronological order can
  333.     be specified (default is reverse-chronological). Added code to listen to the dcmdShutdown
  334.     message and remove our bus error patch (mainly for MacsBugApp).
  335.  
  336.     • ProcInfo - 3.0.2
  337.  
  338.     Made the process name field wider.
  339.  
  340.     • Thing
  341.  
  342.     Added a “-o” (Open) option that restricts the display to components that are open.
  343.  
  344.     • VMDump - 3.0b7
  345.  
  346.     When a page is unmapped, and we’re showing page cacheabilty, we no longer display a
  347.     garbage string.
  348.     
  349.  
  350.     TEMPLATES AND MACROS AND FRIENDS
  351.  
  352.     • Renamed the FCB template FCBRec, and changed it to use real field names from FSM.h.
  353.     Renamed the WDCB template WDCBRec. Added macros to map FCB to FCBRec and WDCB to
  354.     WDCBRec.
  355.  
  356.     • Added machine names for PowerBookG3Series (Wallstreet), PowerBookG3SeriesFSTN
  357.     (Mainstreet), and PowerMac4400_160 (who cares?).
  358.  
  359.     • Fixed the ID for 6100_66 (should be 100, used to be wrong in Gestalt.h, too).
  360.  
  361.     • Added CInfoPB (PBGetCatInfo template), and CInfo, a macro for the same.
  362.  
  363.     • Changed MemoryDispatch (A05C) selector to be a byte.
  364.  
  365.     • Added InsertFontResMenu and InsertIntlResMenu.
  366.  
  367.     • Added Slot Manager templates.
  368.  
  369.     • Added PEFSectionHeader and PEFLoaderInfoHeader templates.
  370.  
  371.     • Added “drvr -b” to the ShowLog macro.
  372.  
  373.     • Added ioWPosOffset.lo to IOParamBlockRec.
  374.  
  375.     • Added FileMgrBusy and dmFSQ macros, and changed DoCmdF15 to use dmFSQ.
  376.  
  377.     • Bumped the default scrollback history size to 128K.
  378.  
  379.  
  380. © 1998 Apple Computer, Inc. All rights reserved.
  381.  
  382. Apple, the Apple logo, Apple IIGS, Macintosh, MPW, Power Macintosh, and PowerBook are trademarks of Apple Computer, Inc., registered in the United States and other countries. PowerPC is a trademark of International Business Machines Corporation, used under license therefrom. AltiVec is a trademark of Motorola, Inc.